import React, { Component, useState } from "react";
import './three.css'
export default class Three extends Component {
    state = {
        flag: true
    }
    isFlag = () => {
        this.setState({
            flag: !this.state.flag
        })
    }
    render() {
        let { flag } = this.state
        return (
            <div>
                <h1>组件Three</h1>
                {flag && <div className="box">three组件</div>}
            </div>
        )
    }
}
